package com.saxon.system.service.impl;

import com.saxon.system.mapper.SysAuthUserMapper;
import com.saxon.system.pojo.SysAuthUser;
import com.saxon.system.service.SysAuthUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

/**
 * 用户登录服务接口继承类
 *
 * @author saxon
 */
@Service
@SuppressWarnings ("all")
public class SysAuthUserServiceImpl implements SysAuthUserService {
    @Autowired
    SysAuthUserMapper sysAuthUserMapper;

    @Override
    public UserDetails loadUserByUsername (String s) throws UsernameNotFoundException {
        return sysAuthUserMapper.getByUsernameAuthUser ();
    }

    @Override
    public SysAuthUser getByUsernameAuthUser () {
        return sysAuthUserMapper.getByUsernameAuthUser ();
    }
}
